import sphRequest from '@/request/sph'

//获取验证码 get /api/user/passport/sendCode/{phone}
export const getSendCode = (phone) => {
  return sphRequest.get(`/user/passport/sendCode/${phone}`)
}

//用户注册 post /api/user/passport/register
export const postRegister = (body) => {
  return sphRequest.post('/user/passport/register', body)
}

//用户登录 post /api/user/passport/login
export const postLogin = (body) => {
  return sphRequest.post('/user/passport/login', body)
}

//根据token获取用户信息 get /api/user/passport/auth/getUserInfo
export const getUserInfo = () => {
  return sphRequest.get("/user/passport/auth/getUserInfo");
};

//退出登录 get /api/user/passport/logout
export const getLogout = () => {
  return sphRequest.get("/user/passport/logout");
};

//获取用户地址 get /api/user/userAddress/auth/findUserAddressList
export const getFindUserAddressList = () => {
  return sphRequest.get("/user/userAddress/auth/findUserAddressList");
};
